From: Eric S. Raymond Date: Fri, 9 Apr 1993 23:17:05 +0000 (+0000) Subject: (emerge-with-ancestor): Applied Donald Erway's fix patch, which X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~96564 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=f3613f5bb58f5cfccb0221143381ffd2f67791f0;p=emacs.git (emerge-with-ancestor): Applied Donald Erway's fix patch, which included the following explanatory comment: "D.Erway - This used to just do emerge-get-diff3-group on 2, then on 3. This was incorrect, since the file 3 info for a diff can preceed the file 2 info for that same diff. So we save and restore point to overcome this. --- diff --git a/lisp/emerge.el b/lisp/emerge.el index c0efed32175..77eac433200 100644 --- a/lisp/emerge.el +++ b/lisp/emerge.el @@ -3,7 +3,7 @@ ;;; The author has placed this file in the public domain. ;; Author: Dale R. Worley -;; Version: 4 +;; Version: 4.1 ;; Keywords: unix, tools ;;; Commentary: @@ -1103,8 +1103,11 @@ This is not a user option, since Emerge uses it for its own processing.") (if (not (string-equal agreement "1")) (setq list (cons - (let ((group-2 (emerge-get-diff3-group "2")) - (group-3 (emerge-get-diff3-group "3"))) + (let (group-2 group-3 pos) + (setq pos (point)) + (setq group-2 (emerge-get-diff3-group "2")) + (goto-char pos) + (setq group-3 (emerge-get-diff3-group "3")) (vector (car group-2) (car (cdr group-2)) (car group-3) (car (cdr group-3)) (cond ((string-equal agreement "2") 'prefer-A)